<template>
  <div class="demo-page">
    <h2>用户系统功能演示</h2>
    
    <div class="demo-section">
      <h3>🎯 核心功能</h3>
      <div class="features">
        <div class="feature-card">
          <h4>账号管理</h4>
          <ul>
            <li>用户注册/登录</li>
            <li>密码找回功能</li>
            <li>第三方登录支持</li>
            <li>安全认证机制</li>
          </ul>
        </div>
        
        <div class="feature-card">
          <h4>收藏与历史</h4>
          <ul>
            <li>影片收藏管理</li>
            <li>观看记录追踪</li>
            <li>清空与恢复功能</li>
            <li>数据导出支持</li>
          </ul>
        </div>
        
        <div class="feature-card">
          <h4>评分与评论</h4>
          <ul>
            <li>1-5星评分系统</li>
            <li>评论发布/编辑/删除</li>
            <li>防刷机制</li>
            <li>评论审核流程</li>
          </ul>
        </div>
        
        <div class="feature-card">
          <h4>个人中心</h4>
          <ul>
            <li>偏好设置管理</li>
            <li>隐私设置控制</li>
            <li>主题切换功能</li>
            <li>数据统计展示</li>
          </ul>
        </div>
      </div>
    </div>

    <div class="demo-section">
      <h3>🔧 技术实现</h3>
      <div class="tech-stack">
        <div class="tech-item">
          <strong>前端框架:</strong> Vue 3 + Composition API
        </div>
        <div class="tech-item">
          <strong>状态管理:</strong> Pinia
        </div>
        <div class="tech-item">
          <strong>路由管理:</strong> Vue Router 4
        </div>
        <div class="tech-item">
          <strong>安全认证:</strong> JWT + bcryptjs
        </div>
        <div class="tech-item">
          <strong>数据存储:</strong> localStorage + 模拟后端API
        </div>
        <div class="tech-item">
          <strong>UI组件:</strong> 自定义组件 + CSS变量主题
        </div>
      </div>
    </div>

    <div class="demo-section">
      <h3>🚀 快速体验</h3>
      <div class="quick-start">
        <div class="step">
          <span class="step-number">1</span>
          <div class="step-content">
            <strong>注册账号</strong>
            <p>点击右上角"登录/注册"按钮创建新账号</p>
          </div>
        </div>
        
        <div class="step">
          <span class="step-number">2</span>
          <div class="step-content">
            <strong>浏览影片</strong>
            <p>在首页浏览影片，点击进入详情页</p>
          </div>
        </div>
        
        <div class="step">
          <span class="step-number">3</span>
          <div class="step-content">
            <strong>互动操作</strong>
            <p>收藏影片、评分、发表评论</p>
          </div>
        </div>
        
        <div class="step">
          <span class="step-number">4</span>
          <div class="step-content">
            <strong>查看记录</strong>
            <p>在个人中心查看收藏和历史记录</p>
          </div>
        </div>
      </div>
    </div>

    <div class="demo-actions">
      <router-link to="/" class="demo-btn primary">开始体验</router-link>
      <router-link to="/login" class="demo-btn secondary">立即登录</router-link>
    </div>
  </div>
</template>

<script setup>
</script>

<style scoped>
.demo-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.demo-section {
  margin-bottom: 40px;
}

.demo-section h3 {
  margin-bottom: 20px;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--card);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #2d3748;
}

.feature-card h4 {
  margin-bottom: 12px;
  color: var(--text);
}

.feature-card ul {
  list-style: none;
  padding: 0;
}

.feature-card li {
  padding: 4px 0;
  color: var(--muted);
  position: relative;
  padding-left: 16px;
}

.feature-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.tech-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.tech-item {
  background: var(--card);
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #2d3748;
}

.quick-start {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--card);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #2d3748;
}

.step-number {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.step-content p {
  margin: 0;
  color: var(--muted);
}

.demo-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

.demo-btn {
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.demo-btn.primary {
  background: var(--primary);
  color: white;
}

.demo-btn.secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }
  
  .tech-stack {
    grid-template-columns: 1fr;
  }
  
  .demo-actions {
    flex-direction: column;
  }
}
</style>